package com.example.newmessageboard.mapper;

import com.example.newmessageboard.model.Messageinfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface MessageMapper {
    @Select("select * from message_info where delete_flag = 0")
    List<Messageinfo> getMessageinfo();
    @Insert("Insert into message_info (`from`,`to`,message) values (#{from},#{to},#{message})")
    Integer insertMessageinfo(Messageinfo messageinfo);
    @Delete("delete from message_info")
    public Integer deleteMessageinfo();
}
